import React from 'react'
import Home from '../views/home'
import Detail from '../views/detail'
import {useRoutes} from 'react-router-dom'
const _ROUTER_LIST = [{
  path: '/',
  element: <Home></Home>
},{
  path: '/post/:id',
  element: <Detail></Detail>
}]
const Router = () => {
  const RouterView = () => useRoutes(_ROUTER_LIST)
  return (
    <RouterView></RouterView>
  )
}

export default Router